package megatron.view.producao;

import java.net.URL;
import java.util.ResourceBundle;

import megatron.view.Main;
import megatron.view.cadastros.MdiCadastroController;

import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.MenuItem;
import javafx.scene.layout.AnchorPane;

public class MdiProdController  extends AnchorPane implements Initializable {

	@FXML
	MenuItem mniCad, mniGeComp, mniGeFat, mniGeEsFis, mniGeCont, mniGePat, mniGePro, mniGeFin, mniGeCus;
	
	private static MdiProdController instance;

	private Main application;
	
	public MdiProdController() {
	    instance = this;
	}
	
	public static MdiProdController getInstance() {
	    return instance;
	}

	@Override
	public void initialize(URL location, ResourceBundle resources) {
		// TODO Auto-generated method stub
	}

	public void setApp(Main application) {
		this.application = application;
	}

	public void MnICadAction() {
		application.getInstance().gotoModulo(mniCad.getText());
	}

	public void MnIGeCusAction() {
		application.getInstance().gotoModulo(mniGeCus.getText());
	}

	public void MnIGeFinAction() {
		application.getInstance().gotoModulo(mniGeFin.getText());
	}

	public void MnIGeProAction() {
		application.getInstance().gotoModulo(mniGePro.getText());
	}

	public void MnIGePatAction() {
		application.getInstance().gotoModulo(mniGePat.getText());
	}

	public void MnIGeContAction() {
		application.getInstance().gotoModulo(mniGeCont.getText());
	}

	public void MnIGeEsFisAction() {
		application.getInstance().gotoModulo(mniGeEsFis.getText());
	}

	public void MnIGeFatAction() {
		application.getInstance().gotoModulo(mniGeFat.getText());
	}

	public void MnIGeCompAction() {
		application.getInstance().gotoModulo(mniGeComp.getText());
	}
}